#ifndef UI_LINETYPEBOX_H
#define UI_LINETYPEBOX_H

#include <qcombobox.h>

#include "lx_define.h"
#include "gui_export.h"

/**
 * A combobox for choosing a line type.
 */
class GUI_EXPORT UI_LineTypeBox: public QComboBox {
    Q_OBJECT

public:
    UI_LineTypeBox(QWidget* parent=0, const char* name=0);
    UI_LineTypeBox(bool showByLayer, bool showUnchanged, 
		QWidget* parent=0, const char* name=0);
    virtual ~UI_LineTypeBox();

    LX_Define::LineType getLineType() {
        return currentLineType;
    }
    void setLineType(LX_Define::LineType w);
    void setLayerLineType(LX_Define::LineType w);

    void init(bool showByLayer, bool showUnchanged);
	
	bool isUnchanged() {
		return unchanged;
	}

private slots:
    void slotLineTypeChanged(int index);

signals:
    void lineTypeChanged(LX_Define::LineType);

private:
    LX_Define::LineType currentLineType;
    bool showByLayer;
	bool showUnchanged;
	bool unchanged;
};

#endif

